#ifndef __SENSOR_LED_H__
#define __SENSOR_LED_H__

#define SENSOR_LED_PIN (25) //P25

#define MILLI_SECOND (1000)

typedef enum _led_status
{
    LED_ON,
    LED_OFF
} led_status_e;

typedef enum _led_blink_mode
{
    LED_BLINK_MODE_PROVISONING = 1000,
    LED_BLINK_MODE_UNPROVISION = 500,
    LED_BLINK_MODE_PROVISIONED = 200,
    LED_BLINK_MODE_STANDBY = 200,
    LED_BLINK_MODE_LOW_BATTERY = 1000,
    LED_BLINK_MODE_OTA = 2000,
    LED_BLINK_MODE_DEFAULT_WORKTIME = 3000
} led_blink_mode;

typedef enum _led_work_mode
{
    LED_WORK_MODE_PROVISONING,
    LED_WORK_MODE_UNPROVISION,
    LED_WORK_MODE_PROVISIONED,
    LED_WORK_MODE_OTA,
    LED_WORK_MODE_STANDBY,
    LED_WORK_MODE_LOW_BATTERY,
    LED_WORK_MODE_SINGLE_PRESS,
    LED_WORK_MODE_DOUBLE_PRESS,
    LED_WORK_MODE_LONG_PRESS
} led_work_mode_e;

typedef struct _sensor_led_s
{
    aos_timer_t blink_timer;
    aos_timer_t delay_sleep_timer;
    uint32_t blink_count;
    gpio_dev_t led_gpio;
} sensor_led_t;

int32_t sensor_set_led_status(led_status_e staus);
int32_t sensor_led_do_work(led_work_mode_e work_mode);
int32_t sensor_led_init(void);

#endif
